package com.hbusa.service.impl;

import com.hbusa.dao.impl.ImageDaoImpl;
import com.hbusa.dto.TbPicture;
import com.hbusa.service.ImageService;
import java.util.List;

/**
 * @author XiaoXin
 * @date 2021/12/27 - 1:06
 */


public class ImageServiceImpl implements ImageService {
    ImageDaoImpl imageDao = new ImageDaoImpl();
    @Override
    public boolean add(TbPicture img) {
        boolean add = imageDao.add(img);
        return add;
    }

    @Override
    public boolean removeById(int id) {
        boolean b = imageDao.removeById(id);
        return b;
    }

    @Override
    public TbPicture queryById(int id) {
        TbPicture picture = imageDao.queryById(id);
        return picture;
    }

    @Override
    public List<TbPicture> queryAll() {
        List<TbPicture> tbPictures = imageDao.queryAll();
        return tbPictures;
    }

    @Override
    public boolean update(int id, TbPicture img) {
        boolean update = imageDao.update(id, img);
        return update;
    }
}
